package controllers

import (
	"fmt"
	"github.com/astaxie/beego"
)

// Operations about blog
type BlogController struct {
	beego.Controller
}

func (c *BlogController) Home() {
	c.Data["Website"] = "bbdxf.win"
	c.Data["Email"] = "zhang206zyx(a)163.com"
	c.TplName = "index.html"
}

func (c *BlogController) ShowName() {
	strName := c.GetString(":name", "index.html")
	fmt.Println(":name", strName)

	// params
	c.Data["SiteName"] = beego.AppConfig.String("SITE_NAME")
	c.Data["SiteDescr"] = beego.AppConfig.String("SITE_DESCR")
	c.Data["CurTitle"] = strName

	c.TplName = strName
}
